using Digitalmes.Application.Mes.Masters.Lines;
using Digitalmes.Application.Mes.Masters.Workstations;

namespace Digitalmes.Application.Mes.Equipments.Machinery;

/// <summary>
/// 设备 DTO 对象。
/// </summary>
public sealed class EquipMachineryDto : Dto
{
    /// <summary>
    /// 设备编号
    /// </summary>
    [NotNull]
    public string? MachineryCode { get; set; }

    /// <summary>
    /// 设备名称
    /// </summary>
    [NotNull]
    public string? MachineryName { get; set; }

    /// <summary>
    /// 品牌
    /// </summary>
    public string? Brand { get; set; }

    /// <summary>
    /// 型号
    /// </summary>
    public string? Model { get; set; }

    /// <summary>
    /// 规格
    /// </summary>
    public string? Spec { get; set; }

    /// <summary>
    /// 制造商
    /// </summary>
    public string? Manufacturer { get; set; }

    /// <summary>
    /// 购置日期
    /// </summary>
    public DateTime? PurchaseDate { get; set; }

    /// <summary>
    /// 设备所在的产线 Id，0 表示不存在。
    /// </summary>
    public long LineId { get; set; }

    /// <summary>
    /// 设备所在的产线。
    /// </summary>
    public MdLineDto? Line { get; set; }

    /// <summary>
    /// 设备所在的工位 Id，0 表示不存在。
    /// </summary>
    public long WorkstationId { get; set; }

    /// <summary>
    /// 设备所在的工位。
    /// </summary>
    public MdWorkstationDto? Workstation { get; set; }

    /// <summary>
    /// 设备别名，用于映射驱动点位
    /// </summary>
    public string? Alias { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 设备状态（如停机等）
    /// </summary>
    public int Status { get; set; }

    public string? CreatedBy { get; set; }

    public DateTime CreatedTime { get; set; }

    public string? UpdatedBy { get; set; }

    public DateTime? UpdatedTime { get; set; }
}
